package terminal.utility;

public class DataUpdater {

    private static DataUpdater instance = null;
    private DataHandler statusHandler = null;

    private DataUpdater() {
    }

    public static DataUpdater getInstance() {
        if (instance == null) {
            instance = new DataUpdater();
        }

        return instance;
    }

    public void registerStatusHandler(DataHandler handler) {
        statusHandler = handler;
    }

    public void updateStatus(int loc, String status) {
        statusHandler.updateStatus(loc, status);
    }

    public void updateAll(int loc, String data) {
        statusHandler.updateAll(loc, data);
    }
    
    public void updateSome(int loc, String data) {
        statusHandler.updateSome(loc, data);
    }
    
}
